

/* grid布局 */

.yungui-grid {
	display: flex;
	flex-wrap: wrap;
	flex: 1;
    
    .yungui-grid-title{
        white-space: nowrap;
    }
    &.scroll-view{
		flex-wrap: nowrap;
		white-space: nowrap;
		overflow-x: auto;
	}
	
	[class*="bg-"] .yungui-avatar{
		color: #fff;
	}
	uni-button,button{
		color: inherit;
	}
}


.yungui-grid-inner{
	display: flex;
	align-items: center;
	justify-content: space-around;
	flex-direction: column;
	text-align: center;
	padding:20rpx;
	position: relative;
	background-position: center;
	background-repeat: no-repeat;
}

.yungui-grid-inner.border::after {
	position: absolute;
	box-sizing: border-box;
	content: ' ';
	pointer-events: none;
	top: -50%;
	right: -50%;
	bottom: -50%;
	left: -50%;
	border: 0 solid #ebedf0;
	-webkit-transform: scale(0.5);
	transform: scale(0.5);
	z-index: 1;
	border-width: 0 1rpx 1rpx 0;
}

.yungui-grid-icon{
	width:48px;
	height:48px;
}
.yungui-grid.col-1 {
	.yungui-grid-item{
		width: 100%;
	}

}

.yungui-grid.col-2{
	.yungui-grid-item{
		width: 50%;
	}

}

.yungui-grid.col-3{
	.yungui-grid-item{
		width: 33.33%;
	}

}

.yungui-grid.col-4 {
	.yungui-grid-item{
		width: 25%;
	}

}

.yungui-grid.col-5 {
	.yungui-grid-item{
		width: 20%;
	}

}

.yungui-grid .yungui-avatar{
	background-color: transparent;
	font-size: 80rpx;
	color:#333;
	.yungui-tag[class*="diy-icon-"]{
		font-size: 20rpx;
	}
}


.yungui-grid.yungui-actions{
	background: inherit;
	align-items: center;

	button.yungui-action{
	    border-radius: 0;
		border: 0px;
		background:none;
		position: relative;
		border: 0px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		line-height: 1;
		text-align: center;
		text-decoration: none;
		overflow: visible;
		transform: translate(0px, 0px);
		&.radius{
			border-radius: 2000px;
		}
	}
	button.yungui-action::after {
		display: none;
	}

	.yungui-action{
		flex:1;
		padding: 6rpx 0;

		&[class*="bg-"]{
			flex:2;
			[class*="diy-icon-"]{
				color: inherit;
			}
		}
		&.radius-right{
			margin-right: 10rpx;
		}
		&.radius-left{
			margin-left: 10rpx;
		}
		&.radius{
			margin-right: 10rpx;
			margin-left: 10rpx;
		}
		.yungui-grid-inner{
			padding:0;
			flex:1;
		}
		.yungui-avatar{
			width:60rpx;
			height:60rpx;
			font-size:60rpx;
		}
		.yungui-grid-inner.border::after{
			border-width: 0 1rpx 0 0;
		}

		.yungui-grid-title{
			&.not-avatar{
				font-size:16px;
				line-height: 80rpx;
			}
		}

		&.addon {
			position: relative;
			z-index: 2;
			padding-top: 60rpx;
			background-color: inherit;

			.yungui-grid-title{
				z-index: 2;
			}

			.yungui-grid-icon {
				position: absolute;
				max-width: 70rpx;
				z-index: 2;
				max-height: 70rpx;
				border-radius: 50%;
				line-height:70rpx;
				font-size: 50rpx;
				top: -64rpx;
				left: 0;
				right: 0;
				margin: auto;
				padding: 0;
			}

			

			&:before {
				position: absolute;
				width: 100rpx;
				height: 100rpx;
				top: -24rpx;
				left: 0;
				right: 0;
				margin: auto;
				content: "";
				box-shadow: 0 -4rpx 8rpx rgba(0, 0, 0, 0.08);
				border-radius: 50rpx;
				background-color: inherit;
				z-index: 0;
			}
		}
	}
	.yungui-action:last-child{
		.yungui-grid-inner.border::after,.yungui-grid-inner.border::solid-right{
			border-width: 0;
		}
	}
}
